package com.int_tech.utils;


import com.int_tech.carLocation.entity.CarLocation;

/**
 * Created by Administrator on 2017/9/8.
 */
public class CarLocationHelp {
    public static CarLocation CarLocationHelp(String carLocation){
        String[] s = carLocation.split("\\$\\$");
        CarLocation CarLocation = new CarLocation();
            CarLocation.setCarNumber(s[0]);
            CarLocation.setLine(s[1]);
            CarLocation.setRow(s[2]);
            CarLocation.setMaximum(s[3]);
            CarLocation.setMinimum(s[4]);
            CarLocation.setColour(s[5]);
            CarLocation.setDatadate(s[6]);
            CarLocation.setDate(s[7]);
            CarLocation.setLng(s[8]);
            CarLocation.setLat(s[9]);
            CarLocation.setAddress(s[10]);
            String[] s1 = s[11].split(",");
            CarLocation.setResultMark(s1[0]);
            CarLocation.setPercent(s1[1]);
            CarLocation.setDataMark(s1[2]);
            String s2 = "";
            for (int i=0;i<s1.length;i++){
                if (i>2){
                    s2+=s1[i]+",";
                }
            }
            CarLocation.setData(s2);
        return CarLocation;
    }
}
